package com.service.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.service.dao.dto.rep.OrderProductHrComboPaddingRep;
import com.service.dao.model.OrderProductHrComboPadding;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Mapper
public interface OrderProductHrComboPaddingMapper extends BaseMapper<OrderProductHrComboPadding> {

    /**
     * @Description: 获取小于当前时间的填充算力订单
     * @Author: ty
     * @Date: 2021/6/8 20:31
     * @param: [coinsId, paddingStatus, startTime]
     * @return: java.util.List<com.service.dao.model.OrderProductHrComboPadding>
     **/
    List<OrderProductHrComboPadding> listBeforeDate(@Param("coinsId") Integer coinsId, @Param("paddingStatus") List<Integer> paddingStatus, @Param("startTime") Date startTime);


    /**
     * @Description: 根据订单统计该订单已填充的生效算力
     * @Author: ty
     * @Date: 2021/6/9 12:25
     * @param: [coinsName, memberId, startTime]
     * @return: java.math.BigDecimal
     **/
    BigDecimal totalEffectPaddingHashRate(@Param("coinsName") String coinsName, @Param("memberId") Integer memberId, @Param("startTime") String startTime);

    List<OrderProductHrComboPaddingRep> memberPaddingList(@Param("userAccount") String userAccount,
                                                          @Param("mobile") String mobile,
                                                          @Param("startTime") String startTime,
                                                          @Param("endTime") String endTime);

}
